package com.nccsjz.pojo;

import org.apache.commons.lang.StringUtils;

/**
 * User类用于封装登录用户信息
 *  
 * @author jason 2009-10-14
 * @since 1.0
 */


public class User {

	/** userId Long 用户编号 */
	private Long userid;
	
	/** username String 登录名 */
	private String username;
	
	/** pwd String 密码 */
	private String pwd;
	
	/** confirmPwd 确认密码 */
	private String confirmPwd;

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}		
	
	public String getConfirmPwd() {
		return confirmPwd;
	}

	public void setConfirmPwd(String confirmPwd) {
		this.confirmPwd = confirmPwd;
	}

	/************* 属性验证  ***********/
	/**
	 * isUserNameBlank方法验证登录名是否为空
	 * 
	 * @return	true:是	false:否
	 */
	public boolean isUserNameBlank(){
		if(StringUtils.isBlank(username)){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * isPwdBlank方法验证登录密码是否为空
	 * 
	 * @return true:是	false:否
	 */
	public boolean isPwdBlank(){
		if(StringUtils.isBlank(pwd)){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * isConfirmPwdBlank方法验证确认密码是否为空
	 * 
	 * @return	true:是	false:否
	 */
	public boolean isConfirmPwdBlank(){
		if(StringUtils.isBlank(confirmPwd)){
			return true;
		}else{
			return false;
		}
	}
	
}
